<template>
  <el-menu :default-openeds="['1', '3']" style="min-height: 100%; overflow-x: hidden"
           background-color="rgb(48, 65, 86)"
           text-color="#fff"
           active-text-color="#409EFF"
           :collapse-transition="false"
           :collapse="isCollapse"
           router
  >
    <div style="height: 60px; line-height: 60px; text-align: center">
      <img src="../assets/logo.png" alt="" style="width: 20px; position: relative; top: 5px; margin-right: 5px">
      <b style="color: white" v-show="!isCollapse">云视源后台管理系统</b>
    </div>
    <el-menu-item index="/" @click="handle_click({ url: '', name: '主页' })">
      <i class="el-icon-s-home"></i>
      <span slot="title">主页</span>
    </el-menu-item>
    <el-menu-item index="/user" @click="handle_click({ url: 'user', name: '用户管理' })">
      <i class="el-icon-user"></i>
      <span slot="title">用户管理</span>
    </el-menu-item>
    <el-submenu index="/product" @click="handle_click({ url: 'product', name: '商品管理' })">
      <template slot="title">
        <i class="el-icon-goods"></i>
        <span slot="title">商品管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="/productCategory" @click="handle_click({ url: 'productCategory', name: '商品类型管理' })">商品类型管理</el-menu-item>
        <el-menu-item index="/Product" @click="handle_click({ url: 'Product', name: '商品信息管理' })">商品信息管理</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-menu-item index="/article" @click="handle_click({ url: 'article', name: '消息管理' })">
      <i class="el-icon-bell"></i>
      <span slot="title">消息管理</span>
    </el-menu-item>
    <el-submenu index="sysConfig" @click="handle_click({ url: 'sysConfig', name: '系统设置' })">
      <template slot="title">
        <i class="el-icon-setting"></i>
        <span slot="title">系统设置</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="fileValue" @click="handle_click({ url: 'fileValue', name: '文件管理' })">文件管理</el-menu-item>
        <!--                <el-menu-item index="sysCityConfig">城市管理</el-menu-item>-->
        <el-menu-item index="verificationCode" @click="handle_click({ url: 'verificationCode', name: '验证码管理' })">验证码管理</el-menu-item>
        <el-menu-item index="systemCategory" @click="handle_click({ url: 'systemCategory', name: '类别管理' })">类别管理</el-menu-item>
        <el-menu-item index="sysConfig" @click="handle_click({ url: 'sysConfig', name: '系统配置' })">系统配置</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
  </el-menu>
</template>

<script>
export default {
  name: "Aside",
  props: {
    isCollapse: Boolean
  },
  data() {
    return {}
  },
  methods: {
    handle_click(data) {
      this.$emit('router-jump', data);
    }
  }
}
</script>

<style scoped>

</style>